package javaDemo06;

public class Years {
    public static void main(String[] args) {
        for(int i = 2000;i <= 2010;i++){
            System.out.println(i + "年有" + dayOfYears(i) + "天");
        }
    }
    public static int dayOfYears(int year){
        if(year % 100 != 0 && year % 4 == 0 || year % 400 == 0){
            return 366;
        }else{
            return 365;
        }
    }
}
